package com.wg.process.behavior;

import org.flowable.bpmn.model.UserTask;
import org.flowable.engine.impl.bpmn.behavior.UserTaskActivityBehavior;
import org.flowable.engine.impl.bpmn.parser.factory.DefaultActivityBehaviorFactory;
import org.springframework.stereotype.Component;

/**
 * 自定义的BehaviorFactory,在ProcessEngineConfiguration中引入
 */
@Component
public class CustomDefaultActivityBehaviorFactory extends DefaultActivityBehaviorFactory  {

    @Override
    public UserTaskActivityBehavior createUserTaskActivityBehavior(UserTask userTask) {
        return new UserTaskActivityBehaviorExt(userTask);
    }
}
